<?php
/**
 *  
 * @package package_name
 * @author Mervin.Wong<mervin0502@163.com>
 * @copyright
 * @license  http://www.apache.org/licenses/LICENSE-2.0
 * @version 0.1.0
 * @date 2013-3-7上午10:02:41
 *
 */
 /**
  * 
  */

 class Option_model extends CI_Model{
 	
 	public function __construct(){
 		parent::__construct();
 		$this->load->database();
 	}
 	
 	/**
 	 * get one record
 	 * @access public
 	 * @param array $field the table field name=>value
 	 * @param string $table description
 	 * @param array $conditions description
 	 *
 	 */
 	public function get_one($field, $table, $conditons){
 		$this->db->select($field);
 		$this->db->from($table);
 		foreach($conditons as $k=>$v){
 			$this->db->where($k, $v);
 		}
 		$query = $this->db->get();
 		if($query->num_rows > 0){
 			return $query->row_array();
 		}else{
 			return false;
 		}
 	}
 }
/* End of file option_model.php */
/* Location: ./app/models/blog/option_model.php */
